﻿using StarryEdge.WPF.Lang;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace StarryEdge.WPF.Converter.Status
{
    [ValueConversion(typeof(bool), typeof(string))]
    public class BoolToRunStatusConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value == null
                ? LangManager.Instance.Lang["StopRun"]
                : System.Convert.ToBoolean(value) ? LangManager.Instance.Lang["Run"] : LangManager.Instance.Lang["StopRun"];
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
